import * as React from 'react'
import FilterLink from './Link' // 引入子组件
import { VisibilityFilters } from '../reduxConfig/actions' // 引入常量名称，显示全部或其它

// 这是一个组件
class Footer extends React.Component {
  render() {
    return (
      <div>
        <span>Show: </span>
        {/* 给这个子组件传递了一个filter属性 */}
        <FilterLink filter={VisibilityFilters.SHOW_ALL}>
          All
        </FilterLink>
        <FilterLink filter={VisibilityFilters.SHOW_ACTIVE}>
          Active
        </FilterLink>
        <FilterLink filter={VisibilityFilters.SHOW_COMPLETED}>
          Completed
        </FilterLink>
      </div>
    )
  }
}
export default Footer
